<?php

namespace common\models;

use Yii;
use yii\behaviors\TimestampBehavior;

/**
 * This is the model class for table "{{%ceping_subject}}".
 *
 * @property string $id
 * @property string $label_name
 * @property string $parent_id
 * @property string $foreign_id
 * @property string $label
 * @property integer $paperId
 * @property integer $status
 * @property string $created_at
 * @property string $updated_at
 * @property string $res1
 * @property string $res2
 * @property string $res3
 */
class CepingSubject extends \yii\db\ActiveRecord      //试题表    形成的试卷
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%ceping_subject}}';
    }
    public function behaviors()
    {
        return [
            TimestampBehavior::className(),
        ];
    }
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [[ 'label_name'], 'required'],
            [[ 'status','rank'], 'integer'],
            [[ 'parent_id', 'foreign_id'], 'string', 'max' => 10],
            [['label_name','label_id'], 'string', 'max' => 50],
            [['paperId','label'], 'string', 'max' => 40],
            [['res1', 'res2', 'res3'], 'string', 'max' => 80]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'label_id' => '标签号',
            'label_name' => '内容',
            'parent_id' => '题干',
            'foreign_id' => '跳转ID',
            'label' => '标签号',
            'paperId' => '试卷号',
            'rank' => '题序号',
            'status' => 'Status',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
            'res1' => 'res1',
            'res2' => 'Res2',
            'res3' => 'Res3',
        ];
    }
}
